import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: '/',
        component: () => import('../views/Mange.vue'),
        redirect: '/home',
        children:[
            {
                path: 'user',
                component: () => import('../views/User.vue'),
            },
            {
                path: 'home',
                component: () => import('../views/Home.vue'),
            },
            {
                path: 'person',
                component: () => import('../views/Person.vue'),
            }
        ]
    },
    {
        path: '/login'  ,
        component: () => import('../views/Login.vue'),

    },
];
const router = createRouter({
    //history: createWebHashHistory(),  // hash路由模式
    history: createWebHistory(),  // history路由模式
    routes
});
export default router;